/**
 * Software Analysis and Verification 
 * @project: Verify Pattern Matching with Guards in Scala
 * @authors: Mirco Dotta and Philippe Suter
 */

package ch.epfl.lara.patterns.ast;



/**
 * AST for the Hierarchy of Classes.
 */ 
sealed abstract class HierarchyTree


/**
 * Common superclass for class definition.
 */
case class HierarchyKlass(isAbstract: Boolean, isCase: Boolean, isObject: Boolean, name: String, parent: Option[String], fields: List[FieldDef]) extends HierarchyTree


/**
 * Fields of a class are the ones declared in the constructor of any class declaration
 * e.g. case class Node(left: Tree, right: Tree)
 * left and right play the role of fields in the node class
 */
case class FieldDef (name: String, typez: String) 


/**
 * A KaseKlass identify what is sensible of being used in a pattern matching expression
 * Only case classes can be matched, additionally they need to be not abstract (since we can't have instances of abstract classes).
 * A case class is either a simple class or an object with a 'case' keyword prefixed to the class declaration.
 */
   /*
abstract class KaseDef (isAbstract: Boolean, isObject: Boolean,name: String, parent: Option[String], fields: List[FieldDef])  extends HierarchyKlass(isAbstract, isObject, name,parent,fields)

case class KaseKlassDef (isAbstract: Boolean, name: String, parent: Option[String], fields: List[FieldDef])  extends KaseDef(isAbstract,false,name,parent,fields)

case class KaseObjectDef (name: String, parent: Option[String]) extends KaseDef(false,true,name,parent,Nil)
*/
  

